<template>
  <div class="head-banlv">
    <div class="tab">
      <p @click="num = 1" :class="{ tabcol: num == 1 }">恩爱榜</p>
      <p @click="num = 2" :class="{ tabcol: num == 2 }">祝福榜</p>
    </div>
    <div class="tabHandle">
      <div class="tabHandleSmall" v-for="(item, index) in list" :key="index" :class="{bgthree:index<3}">
        <div class="pai">
          <img
            src="@/assets/img/home/PHBbanlv/jb1.png"
            alt=""
            v-show="index === 0"
          />
          <img
            src="@/assets/img/home/PHBbanlv/jb2.png"
            alt=""
            v-show="index === 1"
          />
          <img
            src="@/assets/img/home/PHBbanlv/jb3.png"
            alt=""
            v-show="index === 2"
          />
          <span v-show="index > 2">{{ index + 1 }}</span>
        </div>
        <div class="tou">
          <div class="head">
            <img :src="item.head1" alt="" />
            <p>{{ item.name1 }}</p>
          </div>
          <div class="lw">
            <img :src="item.headlw" alt="" />
          </div>
          <div class="head">
            <img :src="item.head2" alt="" />
            <p>{{ item.name2 }}</p>
          </div>
        </div>
        <div class="ai">
          <img src="@/assets/img/home/PHBbanlv/ai.png" alt="" />
          {{ item.ai + "k" }}
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      num: 1,
      list: [
        {
          head1: require("@/assets/img/home/PHBbanlv/head1.png"),
          head2: require("@/assets/img/home/PHBbanlv/head2.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw2.png"),
          name1: "满眼故事",
          name2: "开心了",
          ai: 9790,
        },
        {
          head1: require("@/assets/img/home/PHBbanlv/head4.png"),
          head2: require("@/assets/img/home/PHBbanlv/head3.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw3.png"),
          name1: "满眼故事",
          name2: "开心了",
          ai: 6559,
        },
        {
          head1: require("@/assets/img/home/PHBbanlv/head5.png"),
          head2: require("@/assets/img/home/PHBbanlv/head6.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw1.png"),
          name1: "魏无羡",
          name2: "蓝忘机",
          ai: 3304,
        },
        {
          head1: require("@/assets/img/home/PHBbanlv/head8.png"),
          head2: require("@/assets/img/home/PHBbanlv/head7.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw3.png"),
          name1: "噗噗",
          name2: "贝塔",
          ai: 2437,
        },
        {
          head1: require("@/assets/img/home/PHBbanlv/head9.png"),
          head2: require("@/assets/img/home/PHBbanlv/head10.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw4.png"),
          name1: "爱粉妹妹",
          name2: "教授",
          ai: 2296,
        },
        {
          head1: require("@/assets/img/home/PHBbanlv/head8.png"),
          head2: require("@/assets/img/home/PHBbanlv/head7.png"),
          headlw: require("@/assets/img/home/PHBbanlv/lw4.png"),
          name1: "恩特",
          name2: "雨鱼",
          ai: 1823,
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.head-banlv {
  .tab {
    width: 670px;
    height: 72px;
    margin: 0 auto;
    margin-top: 52px;
    background-color: #626264;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    border-radius: 38px;
    padding: 5px;
    p {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 50%;
      height: 100%;
      border-radius: 38px;
      color: #fff;
    }
    .tabcol {
      background-color: white;
      color: #552869;
    }
  }
  .tabHandle {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    .tabHandleSmall {
      position: relative;
      display: flex;
      align-items: center;
      width: 690px;
      height: 210px;
      margin-top: 15px;
      border-radius: 20px;
      background-color: #cecece;
      background-repeat: no-repeat;
      background-size: 100% 100%;
      background-image: url(@/assets/img/home/PHBbanlv/bg1.png);
      .pai {
        margin-left: 42px;
        span {
          width: 41px;
          height: 62px;
          text-align: center;
          line-height: 62px;
          display: block;
          font-size: 30px;
          font-family: PingFang SC;
          font-weight: 500;
          color: #999999;
        }
        img {
          width: 41px;
          height: 62px;
        }
      }
      .tou {
        margin-left: 54px;
        display: flex;
        .lw {
          width: 80px;
          height: 100px;
          margin: 22px 73px;
          display: flex;
          justify-content: center;
          align-items: center;
          img {
            max-width: 100%;
            max-height: 100%;
            min-width: 60%;
            min-height: 60%;
          }
        }
        .head {
          text-align: center;
          img {
            width: 112px;
            height: 112px;
          }
          p {
            margin-top: 10px;
            font-size: 30px;
            font-family: PingFang SC;
            font-weight: 500;
            color: #ffffff;
          }
        }
      }
      .ai {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        right: 0;
        width: 112px;
        height: 33px;
        background: linear-gradient(90deg, #7ad2ff 0%, #f2a7eb 100%);
        border-radius: 0px 16px 1px 16px;
        font-size: 20px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #ffffff;
        img {
          width: 20px;
          height: 18px;
          margin-right: 5px;
        }
      }
    }
    .bgthree {
      background-image: url(@/assets/img/home/PHBbanlv/bg2.png);
    }
  }
}
</style>
